package com.agua.enturno.vista.modelos;

import com.agua.enturno.util.DateFormatter;
import org.apache.wicket.model.IModel;
import org.joda.time.LocalDate;


public class WeekDayLabelModel implements IModel<String> {
	
	private static final long serialVersionUID = 1L;
	
	private IModel<LocalDate> dateContainingModel;
	
	public WeekDayLabelModel(IModel<LocalDate> dateContainingModel) {
		this.dateContainingModel = dateContainingModel;
	}

	@Override
	public void detach() {
		dateContainingModel.detach();
	}

	@Override
	public String getObject() {
		return DateFormatter.formatWeekDay(dateContainingModel.getObject());
	}

	@Override
	public void setObject(String object) {
		
	}
	
}
